package cn.yuxiaoyuan.config;

import cn.yuxiaoyuan.properties.MapProperties;
import cn.yuxiaoyuan.template.MapTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({MapProperties.class})
public class MapAutoConfiguration {
    @Bean
    public MapTemplate mapUtil(MapProperties properties){//spring会自动给你注入进来
        return new MapTemplate(properties);
    }
}
